<?php

class DistrictController extends Zend_Controller_Action
{

    public function init()
    {
    	$this->view->headTitle("District");
    }

    public function indexAction()
    {
        // action body
    }
    public function detailAction(){
    	$id=$this->_getParam("id");
    	$locMapper=new Model_LocationMapper();
    	$data=$locMapper->getLocationsByDistrict($id);
    	
    	$this->view->locations=$data;
   	
    	$disM=new Model_DistrictMapper();
    	$dis=$disM->getDistrict($id);
    	$this->view->districtName=$dis->getName();
    	$this->view->total=$dis->getTotalLocations();
    	
    }


}

